<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Cpanel extends Controller {

	function Cpanel()
	{
		parent::Controller();
		//$this->lang->load($this->session->userdata['language'], $this->session->userdata['language']);	
		if (empty($this->session->userdata['language']) || $this->session->userdata['language']=='vietnamese')
		{
			//echo "VN";
			$this->lang->load('vietnamese', 'vietnamese');
		}
		else
		{
			//echo "EN";
			$this->lang->load('english', 'english');
		}
	}

	function index()
	{
		$data['icon']="";
		$data['title']="";
		$data['content']=$this->load->view('admin/main','',true);
		$this->load->view('admin/template',$data);
	}
	function changepassword()
	{
		$data['icon']="icon-48-user.png";
		$data['title']=$this->lang->line('changepass');

		$data['content']=$this->load->view('admin/changepassword','',true);
		$this->load->view('admin/template',$data);
	}
	function globalconfig()
	{
		$data['icon']="icon-48-config.png";
		$data['title']=$this->lang->line('m_globalconfig');

		$data['content']=$this->load->view('admin/globalconfig','',true);
		$this->load->view('admin/template',$data);
	}
	function statistic()
	{
		$data['icon']="icon-48-stats.png";
		$data['title']=$this->lang->line('m_statistic');

		$data['content']=$this->load->view('admin/statistic','',true);
		$this->load->view('admin/template',$data);
	}
	
	// display the Tittle of the action
	function actiontitle($info)
	{	
		return $this->load->view('admin/actiontitle',$info,true);
	}
	function abc()
	{
		echo var_dump($_POST);
		$a=$_POST;
		echo $a['currentpassword'];
	}
	
	
}
